package com.zgroup.domain

/**
 * 发布供应
 */
class SupplyInfo extends InfoRelease {

  // 普通住宅：10:普通住宅
  final static String PROP_TYPE_COMMON_HOUSE = "10"

  // 公    寓：20:普通公寓 21:高档公寓 22:酒店式公寓
  final static String PROP_TYPE_COMMPN_APARTMENT = "20"
  final static String PROP_TYPE_GOOD_APARTMENT = "21"
  final static String PROP_TYPE_SERVICED_APARTMENT = "22"

  // 别    墅：30:独栋别墅 31:联排别墅 32:双拼别墅 33:叠加别墅
  final static String PROP_TYPE_DETACHED_VILLA = "30"
  final static String PROP_TYPE_SEMI_DETACHED_VILLA = "31"
  final static String PROP_TYPE_TOWN_VILLA = "32"
  final static String PROP_TYPE_ROW_VILLA = "33"

  // 老 房 子：40:老公寓   41:旧式里弄 42:新式里弄 43:老洋房
  final static String PROP_TYPE_OLD_APARTMENT = "40"
  final static String PROP_TYPE_OLD_STYLE_LANE_HOUSE = "41"
  final static String PROP_TYPE_NEW_STYLE_LANE_HOUSE = "42"
  final static String PROP_TYPE_OLD_HOUSE = "43"

  //物业朝向
  final static String PROP_FACING_EAST = "E"
  final static String PROP_FACING_SOUTH = "S"
  final static String PROP_FACING_WEST = "W"
  final static String PROP_FACING_NORTH = "N"
  final static String PROP_FACING_EAST_SOUTH = "ES"
  final static String PROP_FACING_EAST_NORTH = "EN"
  final static String PROP_FACING_WEST_SOUTH = "WS"
  final static String PROP_FACING_WEST_NORTH = "WN"

  //支付方式
  final static String PAYMENT_TERM_ONE_DEPOSIT_ONE_RENT = "1:1"   //押一付一
  final static String PAYMENT_TERM_TWO_DEPOSIT_ONE_RENT = "2:1"   //押二付一
  final static String PAYMENT_TERM_THREE_DEPOSIT_ONE_RENT = "3:1" //押三付一
  final static String PAYMENT_TERM_ONE_DEPOSIT_TWO_RENT = "1:2"   //押一付二
  final static String PAYMENT_TERM_TWO_DEPOSIT_TWO_RENT = "2:2"   //押二付二
  final static String PAYMENT_TERM_THREE_DEPOSIT_TWO_RENT = "3:2" //押三付二
  final static String PAYMENT_TERM_ONE_DEPOSIT_THREE_RENT = "1:3" //押一付三
  final static String PAYMENT_TERM_TWO_DEPOSIT_THREE_RENT = "2:3" //押二付三
  final static String PAYMENT_TERM_THREE_DEPOSIT_THREE_RENT = "3:3"//押三付三
  final static String PAYMENT_TERM_SIX_RENT = "6:0"               //半年一付
  final static String PAYMENT_TERM_TWELVE_RENT = "12:0"           //一年一付

  //最短租期
  final static String SHORTEST_LEASE_TWO_YRS_OR_MORE = "24"  //2年及以上
  final static String SHORTEST_LEASE_ONE_YRS = "12"           //1年
  final static String SHORTEST_LEASE_SIX_MTHS = "6"           //半年
  final static String SHORTEST_LEASE_THREE_MTHS = "3"         //3个月
  final static String SHORTEST_LEASE_ONE_MTH = "1"            //1个月
  final static String SHORTEST_LEASE_BY_DAY = "0"             //按天算

  final static String OWNERSHIP_COMMERCIAL = "10"            //商品房
  final static String OWNERSHIP_SOLD_PUBLIC_PROPERTY = "20"//使用权房
  final static String OWNERSHIP_USERSHIP = "30"              //售后公房
  final static String OWNERSHIP_ECONOMICAL = "40"           //经济适用房
  final static String OWNERSHIP_CORPORATE = "50"            //单位产权
  final static String OWNERSHIP_OTHER = "99"                 //其他

  //装修程度
  final static String DECORATION_NOT = "10" //未装修
  final static String DECORATION_SIMPLE = "20" //简单装修
  final static String DECORATION_MIDDLE = "30" //简单装修
  final static String DECORATION_DELUXE = "40" //简单装修

  //基本信息
  String propertyType     //物业类型
  String rooms           //室
  String lounges         //厅
  String washrooms       //卫
  String floor            //所在楼层
  String totalFloor       //总楼层
  String propertyFacing   //物业朝向
  String propertyAge     //物业房龄
  String buildingArea   //建筑面积（m2）
  String rentingStyle     //出租形式
  String shortestLease    //最短租期
  String ownership        //房屋产权
  String paymentTerm      //支付方式
  String spFacilities   //配套设置
  String spFacilitiesCode //配套设置代码
  String rentDayPrice    //出租价格（单位：元/日）

  //配套信息
  String decoration //房源装修
  String liftNum//电梯数
  String houseHold//户
  String gardenArea//花园面积（m2）
  String parkingPrice//车位价格（单位：元/月）
  String garageArea//车库面积（m2）

  static constraints = {
    propertyType(blank: false, maxSize: 6);
    propertyFacing(blank: false, maxSize: 6);
    rooms(blank: false, maxSize: 6);
    lounges(blank: false, maxSize: 6);
    washrooms(blank: false, maxSize: 6);
    rentingStyle(nullable: true, maxSize: 6);
    buildingArea(blank: false, maxSize: 10);
    spFacilities(nullable: true, maxSize: 255);
    spFacilitiesCode(nullable: true, maxSize: 255);
    rentDayPrice(nullable: true, maxSize: 10);
    shortestLease(nullable: true, maxSize: 6);
    ownership(nullable: true, maxSize: 6);

    paymentTerm(nullable: true, maxSize: 6);
    decoration(blank: false, maxSize: 6);
    gardenArea(nullable: true, maxSize: 10)
    parkingPrice(nullable: true, maxSize: 10)
    garageArea(nullable: true, maxSize: 10)
    liftNum(nullable: true, maxSize: 10)
    houseHold(nullable: true, maxSize: 10)
    gardenArea(nullable: true, maxSize: 10)
    parkingPrice(nullable: true, maxSize: 10)
    garageArea(nullable: true, maxSize: 10)

  }

  static mapping = {
    cache true
    dynamicInsert true
    dynamicUpdate true
  }

}

